// SPDX-License-Identifier: MIT

@use "../settings/icons";

$button-radius: 10em !default;

.pagination {
  -fx-padding: 0;
  -fx-arrow-button-gap: 4;
  -fx-arrows-visible: true;
  -fx-tooltip-visible: false;
  -fx-page-information-visible: true;
  -fx-page-information-alignment: bottom;

  >.page {
    -fx-background-color: transparent;
  }

  >.pagination-control {
    -fx-background-color: transparent;
    -fx-font-size: 1em;

    >.control-box {
      -fx-padding: 0.5em 0 0 0;
      -fx-spacing: 2px;
      -fx-alignment: CENTER;

      .number-button {
        -fx-padding: 0;
      }

      >.left-arrow-button {
        >.left-arrow {
          @include icons.get("arrow-left", false);
          -fx-background-color: -color-fg-default;
        }
      }

      >.right-arrow-button {
        >.right-arrow {
          @include icons.get("arrow-right", false);
          -fx-background-color: -color-fg-default;
        }
      }
    }

    >.page-information {
      -fx-padding: 0.5em 0 0 0;
    }
  }

  // Pagination.STYLE_CLASS_BULLET
  &.bullet {
    >.pagination-control {

      >.control-box {
        -fx-spacing: 0;

        >.left-arrow-button {
          -fx-background-radius: $button-radius;
          -fx-padding: 0 0.25em 0 0.083em; // center arrow inside the circle
        }

        >.right-arrow-button {
          -fx-background-radius: $button-radius;
          -fx-padding: 0 0.083em 0 0.25em; // center arrow inside the circle
        }

        >.bullet-button {
          -fx-background-radius: 0, $button-radius, $button-radius;
          -fx-background-color: transparent, -color-border-default, -color-bg-subtle;
          -fx-background-insets: 0, 5, 6;

          &:selected {
            -fx-background-color: transparent, -color-accent-emphasis;
          }
        }
      }
    }
  }
}
